package cn;

import cn.webrx.entity.Book;
import cn.webrx.entity.Teacher;
import cn.webrx.entity.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(value = "classpath:beans.xml")
public class Demo {
    @Autowired
    private User user;

    /* bk bookphp*/
    @Autowired @Qualifier("bookphp")
    private Book book;

    @Autowired(required = false)
    private Teacher teacher;

    @Autowired @Qualifier("teacher")
    private Teacher tt;

    @Test
    public void t1(){
        //System.out.println(user);

        System.out.println(book);

        System.out.println(teacher);

        System.out.println(tt);
    }
}
